home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / AppInstall / DialogMultipleApps.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  2.5 KB  |  46 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from SimpleGladeApp import SimpleGladeApp
  5. import gtk
  6. import gobject
  7. import os
  8. from Util import *
  9. from gettext import gettext as _
  10. from widgets.AppListView import AppListView
  11.  
  12. class DialogMultipleApps(SimpleGladeApp):
  13.     
  14.     def __init__(self, datadir, parent, multiple_items_list, name, remove):
  15.         SimpleGladeApp.__init__(self, path = datadir + '/gnome-app-install.glade', root = 'dialog_multiple_apps', domain = 'gnome-app-install')
  16.         self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gobject.TYPE_INT)
  17.         for elm in multiple_items_list:
  18.             self.store.append((elm.name, elm, 0))
  19.         
  20.         self.dialog_multiple_apps.set_transient_for(parent)
  21.         self.treeview_apps = AppListView(style = 1)
  22.         self.scrolledwindow_multiple_apps.add(self.treeview_apps)
  23.         self.treeview_apps.set_headers_visible(False)
  24.         self.treeview_apps.set_model(self.store)
  25.         self.treeview_apps.show()
  26.         if remove == True:
  27.             header = _('Remove %s and bundled applications?') % name
  28.             msg = _('%s is part of a software collection. If you remove %s, you will remove all bundled applications as well.') % (name, name)
  29.             label = _('_Remove All')
  30.         else:
  31.             header = _('Install %s and bundled applications?') % name
  32.             msg = _('%s is part of a software collection. If you install %s, you will install all bundled applications as well.') % (name, name)
  33.             label = _('_Install All')
  34.         self.label_multiple.set_markup('<b><big>%s</big></b>\n\n%s' % (header, msg))
  35.         self.button_multiple_action.set_label(label)
  36.  
  37.     
  38.     def run(self):
  39.         return self.dialog_multiple_apps.run()
  40.  
  41.     
  42.     def hide(self):
  43.         self.dialog_multiple_apps.hide()
  44.  
  45.  
  46.